import request from "@/utils/request"

export function addCarts(carts) {
    return request({
        method: "post",
        url: '/carts/addCarts',
        params: carts
    })
}

export function getCartsByUser(page, size, userId) {
    return request({
        method: "get",
        url: '/carts/getCartsByUser',
        params: {
            page: page,
            size: size,
            userId: userId
        }
    })
}

export function deleteCartsById(id) {
    return request({
        method: "delete",
        url: '/carts/deleteCartsById',
        params: {
            id: id
        }
    })
}
export default {
    addCarts, deleteCartsById, getCartsByUser
}